#define LCCTOOLBOX_DLL_IMPORT_LCCTOOLBOX
#define LCCTOOLBOX_DLL_IMPORT_LENCUCU
#include<ALLINALL.hpp>
#include<lencucu.hpp>
using namespace Allinall;
using namespace Lencucu;
#ifdef _WIN32
#pragma comment(lib,"lencucu")
#endif


//////////////////
/** [module ability illustrate]
 * hold the lencucu instance(as lencucuHolderVar in mess)
 * */
// lencucu lcc;// this will cause error at:
// lencucu_Environment.inl : 29
// but below can work
struct localHolder{
	lencucu* lcc_p=nullptr;
	void init(){lcc_p=new lencucu;}
	~localHolder(){if(lcc_p) delete lcc_p;}
}holder;
//////////////////


__shakeShake_(AIAPtr){
	auto& AIA=*ptras<allinall>(AIAPtr);
	holder.init();

	// record lencucu to 'mess'
	LccToolbox::snote_(lencucuHolderType,);
	LccToolbox::note_(lencucuHolderVar,);
	AIA.mess.define(lencucuHolderType,sizeof(void*));
	AIA.mess.surround(lencucuHolderType);
	AIA.mess.instantiate(lencucuHolderVar);
	*(ptras<lencucu*>(AIA.mess.var_address(lencucuHolderVar)))=holder.lcc_p;
}